package com.yuan.order.execption;

import com.yuan.order.enums.ResultEnum;
import lombok.Getter;

/**
 * 自定义异常
 *
 * @Author yuan
 * @Date 2021/2/25 14:58
 */
@Getter
public class SellException extends RuntimeException {
    private Integer code;

    public SellException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }

    public SellException(Integer code, String msg) {
        super(msg);
        this.code = code;
    }
}
